home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
176-200
/
scopedisk185
/
calc
/
calc.doc
< prev
next >
Wrap
Text File
|
1995-03-19
|
9KB
|
244 lines
Calc V1.01 25-Mar-89
Copyright (c) 1989 Martin Taillefer, All Rights Reserved
This is freely redistributable (see conditions below)
Copyright and Disclaimer
========================
Title to this software and all copies thereof remain vested in the author
indicated in the above copyright notice. Holders of this software are
granted the right to reproduce and use the same for personal, non-commercial
purposes. All other rights are reserved.
NO REPRESENTATIONS OR WARRANTIES ARE MADE WITH RESPECT TO THE ACCURACY,
RELIABILITY, PERFORMANCE, OR OPERATION OF THIS SOFTWARE, AND ALL SUCH USE IS
AT YOUR OWN RISK. THE AUTHOR DOES NOT ASSUME ANY RESPONSIBILITY OR LIABILITY
WHATSOEVER WITH RESPECT TO YOUR USE OF THIS SOFTWARE.
For inquiries regarding distribution or commercial uses of this software,
contact:
Martin Taillefer
136 Des Frenes
Montreal, Quebec
CANADA H1B 1X8
TEL: 514/645-4083
BIX: vertex
CIS: 76004,2054
Distribution Agreement
======================
This software product was written using the V1.00 M2Sprint development
environment. It is copyrighted by the author but may be freely redistributed
as long as the following conditions are respected:
-To the exception of media charges, the software must be distributed free
of charge.
-The ZOO archive used to distribute the software must remain intact. All
files distributed with the original archive must accompany further
distributions in an un-altered state. Distribution of the software by Public
Domain libraries is allowed in an un-archived format, as long as the totality
of the files from the original archive be included in an un-altered state.
-No modifications to the original software may be made and then returned
for public distribution under the original name of the software. This is to
avoid multiple parallel versions of the software to appear.
The source code to this software may be used to develop commercial or
non-commercial software for the Amiga. No limitations on this use are imposed
to the exception that the software produced by using this source code must be
substantially different than this software product.
Bugs and Suggestions
====================
If you find any bugs or inconsistencies or have suggestions to improve this
software product, please contact the author at the address mentioned above.
Electronic communication is preferred.
Calc Support Documentation
==========================
Calc, A Programmer's Calculator
-------------------------------
Calc provides many functions often needed by programmers. Conversion between
various number bases, control of bit size of operations, and full keyboard
control are features making Calc a very useful addition to a programmer's set
of tools.
Calc uses a data entry model similar to the TI calculators. Which is:
{<number> <operation> <number>} <=>
Example: "2" "+" "5" "="
"3" "-" "1" "*" "2" "="
The operations supported by Calc fall into three classes:
· Immediate operations
· High priority binary operations
· Low priority binary operations
Immediate operations affect the currently displayed value only. For example,
hitting the "+/-" gadget inverts the sign of the currently displayed value
only and does not affect the rest of the current sequence of operations. NOT,
«SH and AS» are other examples of Immediate operations.
High priority binary operations involve two numbers and are evaluated
immediately. For example, the multiplication operation gets evaluated as soon
as the second number involved in the operation is entered. This is as opposed
to the behavior of the low priority operations such as addition which are
delayed. This follows the normal conventions adopted in mathematics. For
example:
2+3*6
will give 20, and not 36. The multiplication operation gets evaluated before
the addition operation. A few more examples:
2+3*6+7 gives 27
2+3*6/2 gives 11 (division is a high priority operator)
As seen in the above example, when there are several operators of the same
priority in a given expression, they are evaluated from left to right. This
is consistent with the way TI calculators operates.
Calc also supports parenthesis in the normal way, which means that
expressions enclosed in parenthesis are evaluated before other expressions
regardless of the priority of the involved operators.
Running Calc
------------
To start Calc, simply double-click its icon, or invoke it by name from a CLI
or shell. There are no TOOLTYPES options, and no command-line parameters
supported. To quit the program, either click the close gadget, or hit the ESC
key on your keyboard.
Supported Functions
-------------------
All supported functions are listed in the table below.
The first column shows the text used on the calculator's gadgets.
The second column shows the keyboard equivalents for the gadgets. For
example, hitting "s" or "S" is the same as clicking on the STO gadget.
The third column shows the priority of the operations attached to the
gadgets. H is High, L is Low, and I is Immediate.
The right hand side of the table gives plain English descriptions of the
operations attached to the gadgets.
CA DEL I Clear All, reset to initial state
CE Spacebar I Clear Entry, reset the current entry back to 0
AND & H Logical AND operation
OR | or O H Logical OR operation
XOR X H Logical exclusive OR operation
NOT ~ or ! I Logical negation
«AS I Arithmetic shift left
AS» I Arithmetic shift right
«RO I Binary ROL operation to the left
RO» I Binary ROL operation to the right
«SH < I Logical shift left
SH» > I Logical shift right
STO S I Store currently displayed value in backup memory
RCL R I Recall the value stored in the backup memory
BIN I Puts the display into Binary (base 2) mode. Only the
way the numbers are displayed is affected, all
internal computations perform exactly the same
regardless of the selected base.
OCT I Puts the display into Octal (base 8) mode. Only the
way the numbers are displayed is affected, all
internal computations perform exactly the same
regardless of the selected base.
DEC I Puts the display into Decimal (base 10) mode. Only the
way the numbers are displayed is affected, all
internal computations perform exactly the same
regardless of the selected base.
HEX I Puts the display into Hexadecimal (base 16) mode. Only
the way the numbers are displayed is affected, all
internal computations perform exactly the same
regardless of the selected base.
= = RETURN H Performs all pending operations and yields a result.
This will close any opened parenthesis for you before
performing the calculations.
Additional keyboard support includes 0-9 and A-F to enter numbers, + - * / to
perform operations, and ( ) to isolate expressions. As well the ESC key can
be used as a synonym to clicking the window close gadget to quit the program.
Calc Menus
----------
Calc has a menu strip which contains only one menu. Keyboard shortcuts for
the menu are accessed using the right Amiga key and another key. See the menu
display to learn of the keyboard shortcuts.
The first section of the menu allows you to select the bit size used to
perform any operations. This corresponds directly to the 68000 bit sizes. If
you do not know what bit sizes involve, leave this setting to 32.
The second section of the menu allows you to control whether or not you are
working with signed or unsigned values. Again, this corresponds directly to
the 68000's view of the world.
Finally, the About... menu item allows you to display the version number and
a copyright message.
Modification History
====================
Version: 1.00
Author : Martin Taillefer
Date : 20-Mar-89
Changes: Original
Version: 1.01
Author : Martin Taillefer
Date : 25-Mar-89
Changes: Memory overwrite bug fixed. Would cause the program to crash when
recompiled with modifications! Added a few more keyboard shortcuts.
Made minor adjustments to the internal layout to improve consistency
of the source.